API: Remove gdk_window_process_all_updates()
authorBenjamin Otte <otte@redhat.com>
Wed, 23 Nov 2016 18:10:34 +0000 (19:10 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 23 Nov 2016 18:10:34 +0000 (19:10 +0100)
It's completely unused since we have a frame clock.

14 files changed:
docs/reference/gdk/gdk4-sections.txt
gdk/broadway/gdkdisplay-broadway.c
gdk/broadway/gdkprivate-broadway.h
gdk/broadway/gdkwindow-broadway.c
gdk/gdkdisplayprivate.h
gdk/gdkwindow.c
gdk/mir/gdkmirdisplay.c
gdk/quartz/gdkdisplay-quartz.c
gdk/quartz/gdkwindow-quartz.c
gdk/wayland/gdkdisplay-wayland.c
gdk/win32/gdkdisplay-win32.c
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkprivate-x11.h
gdk/x11/gdkwindow-x11.c

index 4b81010b704768f1f5bb67ba489f4bdfe555eb90..5df821e5d1e974eaa0090d5ac0e6700f008d33cd 100644 (file)
@@ -351,7 +351,6 @@ gdk_window_invalidate_maybe_recurse
 gdk_window_get_update_area
 gdk_window_freeze_updates
 gdk_window_thaw_updates
-gdk_window_process_all_updates
 gdk_window_get_frame_clock
 
 <SUBSECTION>
index a891e0d69d8786685ae27ed403e94e86c56b9211..8d3c76a17e1786fe9e2e2a76ed3edea0b6e92153 100644 (file)
@@ -341,8 +341,6 @@ gdk_broadway_display_class_init (GdkBroadwayDisplayClass * class)
   display_class->supports_cursor_alpha = _gdk_broadway_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_broadway_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = _gdk_broadway_display_before_process_all_updates;
-  display_class->after_process_all_updates = _gdk_broadway_display_after_process_all_updates;
   display_class->get_next_serial = gdk_broadway_display_get_next_serial;
   display_class->notify_startup_complete = gdk_broadway_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_broadway_display_create_window_impl;
index c1af87c2f7b3994e8d0ae5b33bb65a30b1455f3e..b5710cfe49236ff892528da465596130af3dc897 100644 (file)
@@ -116,8 +116,6 @@ void _gdk_broadway_display_get_default_cursor_size (GdkDisplay *display,
 void _gdk_broadway_display_get_maximal_cursor_size (GdkDisplay *display,
                                                    guint       *width,
                                                    guint       *height);
-void       _gdk_broadway_display_before_process_all_updates (GdkDisplay *display);
-void       _gdk_broadway_display_after_process_all_updates  (GdkDisplay *display);
 void       _gdk_broadway_display_create_window_impl     (GdkDisplay    *display,
                                                         GdkWindow     *window,
                                                         GdkWindow     *real_parent,
index 1ddc444dd71f9d429267ad3e4904ed56ed57a722..1271616bb83e2ae8b1a7fab87715995be25c17f5 100644 (file)
@@ -1492,16 +1492,6 @@ gdk_broadway_window_set_opacity (GdkWindow *window,
     opacity = 1;
 }
 
-void
-_gdk_broadway_display_before_process_all_updates (GdkDisplay *display)
-{
-}
-
-void
-_gdk_broadway_display_after_process_all_updates (GdkDisplay *display)
-{
-}
-
 guint32
 gdk_broadway_get_last_seen_time (GdkWindow  *window)
 {
index a9fce70e7674841fa622d938d72f52c823aecdae..566477686f8884efb7251be2b7b5f8ff1e9fec99 100644 (file)
@@ -178,9 +178,6 @@ struct _GdkDisplayClass
 
   GdkAppLaunchContext *      (*get_app_launch_context) (GdkDisplay *display);
 
-  void                       (*before_process_all_updates) (GdkDisplay *display);
-  void                       (*after_process_all_updates)  (GdkDisplay *display);
-
   gulong                     (*get_next_serial) (GdkDisplay *display);
 
   void                       (*notify_startup_complete) (GdkDisplay  *display,
index 07aff2ac730786a6540435706e1ed8f1bd6540a4..7d3804e272682374317794bf7bed1333d8dea2dc 100644 (file)
@@ -3510,120 +3510,6 @@ gdk_window_process_updates_internal (GdkWindow *window)
   g_object_unref (window);
 }
 
-static void
-flush_all_displays (void)
-{
-  GSList *displays, *l;
-
-  displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
-  for (l = displays; l; l = l->next)
-    gdk_display_flush (l->data);
-
-  g_slist_free (displays);
-}
-
-static void
-before_process_all_updates (void)
-{
-  GSList *displays, *l;
-  GdkDisplayClass *display_class;
-
-  displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
-  display_class = GDK_DISPLAY_GET_CLASS (displays->data);
-  for (l = displays; l; l = l->next)
-    display_class->before_process_all_updates (l->data);
-
-  g_slist_free (displays);
-}
-
-static void
-after_process_all_updates (void)
-{
-  GSList *displays, *l;
-  GdkDisplayClass *display_class;
-
-  displays = gdk_display_manager_list_displays (gdk_display_manager_get ());
-  display_class = GDK_DISPLAY_GET_CLASS (displays->data);
-  for (l = displays; l; l = l->next)
-    display_class->after_process_all_updates (l->data);
-
-  g_slist_free (displays);
-}
-
-/* Currently it is not possible to override
- * gdk_window_process_all_updates in the same manner as
- * gdk_window_process_updates and gdk_window_invalidate_maybe_recurse
- * by implementing the GdkPaintable interface.  If in the future a
- * backend would need this, the right solution would be to add a
- * method to GdkDisplay that can be optionally
- * NULL. gdk_window_process_all_updates can then walk the list of open
- * displays and call the mehod.
- */
-
-/**
- * gdk_window_process_all_updates:
- *
- * Calls gdk_window_process_updates() for all windows (see #GdkWindow)
- * in the application.
- *
- **/
-void
-gdk_window_process_all_updates (void)
-{
-  GSList *old_update_windows = update_windows;
-  GSList *tmp_list = update_windows;
-  static gboolean in_process_all_updates = FALSE;
-  static gboolean got_recursive_update = FALSE;
-
-  if (in_process_all_updates)
-    {
-      /* We can't do this now since that would recurse, so
-        delay it until after the recursion is done. */
-      got_recursive_update = TRUE;
-      return;
-    }
-
-  in_process_all_updates = TRUE;
-  got_recursive_update = FALSE;
-
-  update_windows = NULL;
-
-  before_process_all_updates ();
-
-  while (tmp_list)
-    {
-      GdkWindow *window = tmp_list->data;
-
-      if (!GDK_WINDOW_DESTROYED (window))
-       {
-         if (window->update_freeze_count ||
-             gdk_window_is_toplevel_frozen (window))
-           gdk_window_add_update_window (window);
-         else
-           gdk_window_process_updates_internal (window);
-       }
-
-      g_object_unref (window);
-      tmp_list = tmp_list->next;
-    }
-
-  g_slist_free (old_update_windows);
-
-  flush_all_displays ();
-
-  after_process_all_updates ();
-
-  in_process_all_updates = FALSE;
-
-  /* If we ignored a recursive call, schedule a
-     redraw now so that it eventually happens,
-     otherwise we could miss an update if nothing
-     else schedules an update. */
-  if (got_recursive_update)
-    gdk_window_schedule_update (NULL);
-}
-
-
 enum {
   PROCESS_UPDATES_NO_RECURSE,
   PROCESS_UPDATES_WITH_ALL_CHILDREN,
index c42962e389609f2806540a77fb14680db92fd1bf..0427dc3823170665bd5e2cdde97e548289111436 100644 (file)
@@ -361,18 +361,6 @@ gdk_mir_display_get_app_launch_context (GdkDisplay *display)
   return NULL;
 }
 
-static void
-gdk_mir_display_before_process_all_updates (GdkDisplay *display)
-{
-  //g_printerr ("gdk_mir_display_before_process_all_updates\n");
-}
-
-static void
-gdk_mir_display_after_process_all_updates (GdkDisplay *display)
-{
-  //g_printerr ("gdk_mir_display_after_process_all_updates\n");
-}
-
 static gulong
 gdk_mir_display_get_next_serial (GdkDisplay *display)
 {
@@ -737,8 +725,6 @@ gdk_mir_display_class_init (GdkMirDisplayClass *klass)
   display_class->get_cursor_for_name = gdk_mir_display_get_cursor_for_name;
   display_class->get_cursor_for_surface = gdk_mir_display_get_cursor_for_surface;
   display_class->get_app_launch_context = gdk_mir_display_get_app_launch_context;
-  display_class->before_process_all_updates = gdk_mir_display_before_process_all_updates;
-  display_class->after_process_all_updates = gdk_mir_display_after_process_all_updates;
   display_class->get_next_serial = gdk_mir_display_get_next_serial;
   display_class->notify_startup_complete = gdk_mir_display_notify_startup_complete;
   display_class->create_window_impl = gdk_mir_display_create_window_impl;
index b24fdffa1c3a04c6dce224232ff833cbf09ae24c..ebef51473438655bcfff403892b14351ab6a1fd6 100644 (file)
@@ -244,8 +244,6 @@ gdk_quartz_display_class_init (GdkQuartzDisplayClass *class)
   display_class->supports_cursor_alpha = _gdk_quartz_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_quartz_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = _gdk_quartz_display_before_process_all_updates;
-  display_class->after_process_all_updates = _gdk_quartz_display_after_process_all_updates;
   display_class->get_next_serial = gdk_quartz_display_get_next_serial;
   display_class->notify_startup_complete = gdk_quartz_display_notify_startup_complete;
   display_class->event_data_copy = _gdk_quartz_display_event_data_copy;
index 1c548cc78726c01ef54ff9de73700e7df16461be..ae2ca22959e0cc1c96832a061e94c92474a6ca5b 100644 (file)
@@ -400,44 +400,6 @@ _gdk_quartz_window_process_updates_recurse (GdkWindow *window,
    */
 }
 
-void
-_gdk_quartz_display_before_process_all_updates (GdkDisplay *display)
-{
-  in_process_all_updates = TRUE;
-
-  NSDisableScreenUpdates ();
-}
-
-void
-_gdk_quartz_display_after_process_all_updates (GdkDisplay *display)
-{
-  GSList *old_update_nswindows = update_nswindows;
-  GSList *tmp_list = update_nswindows;
-
-  update_nswindows = NULL;
-
-  while (tmp_list)
-    {
-      NSWindow *nswindow = tmp_list->data;
-
-      [[nswindow contentView] displayIfNeeded];
-
-      _gdk_quartz_window_flush (NULL);
-
-      [nswindow enableFlushWindow];
-      [nswindow flushWindow];
-      [nswindow release];
-
-      tmp_list = tmp_list->next;
-    }
-
-  g_slist_free (old_update_nswindows);
-
-  in_process_all_updates = FALSE;
-
-  NSEnableScreenUpdates ();
-}
-
 static const gchar *
 get_default_title (void)
 {
index 2ed7d278f1b02b7ab2eb1c25dc02a94d772c5b81..3486748cd1b92a6454f092ab2ddf481f80dc9366 100644 (file)
@@ -772,17 +772,6 @@ gdk_wayland_display_supports_input_shapes (GdkDisplay *display)
   return TRUE;
 }
 
-static void
-gdk_wayland_display_before_process_all_updates (GdkDisplay *display)
-{
-}
-
-static void
-gdk_wayland_display_after_process_all_updates (GdkDisplay *display)
-{
-  /* Post the damage here instead? */
-}
-
 static gulong
 gdk_wayland_display_get_next_serial (GdkDisplay *display)
 {
@@ -952,8 +941,6 @@ gdk_wayland_display_class_init (GdkWaylandDisplayClass *class)
   display_class->get_cursor_for_surface = _gdk_wayland_display_get_cursor_for_surface;
   display_class->supports_cursor_alpha = _gdk_wayland_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_wayland_display_supports_cursor_color;
-  display_class->before_process_all_updates = gdk_wayland_display_before_process_all_updates;
-  display_class->after_process_all_updates = gdk_wayland_display_after_process_all_updates;
   display_class->get_next_serial = gdk_wayland_display_get_next_serial;
   display_class->notify_startup_complete = gdk_wayland_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_wayland_display_create_window_impl;
index c701e2e0363cb743d243b8b36d4ed3870ab4d92b..03eabd804e38e100642c6fc055db806d6a6c2df4 100644 (file)
@@ -1090,17 +1090,6 @@ gdk_win32_display_check_composited (GdkWin32Display *display)
   gdk_display_set_composited (GDK_DISPLAY (display), composited);
 }
 
-static void
-gdk_win32_display_before_process_all_updates (GdkDisplay  *display)
-{
-  /* nothing */
-}
-static void
-gdk_win32_display_after_process_all_updates (GdkDisplay  *display)
-{
-  /* nothing */
-}
-
 static void
 gdk_win32_display_notify_startup_complete (GdkDisplay  *display,
                                            const gchar *startup_id)
@@ -1273,8 +1262,6 @@ gdk_win32_display_class_init (GdkWin32DisplayClass *klass)
   display_class->supports_cursor_alpha = _gdk_win32_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_win32_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = gdk_win32_display_before_process_all_updates;
-  display_class->after_process_all_updates = gdk_win32_display_after_process_all_updates;
   display_class->get_next_serial = gdk_win32_display_get_next_serial;
   display_class->notify_startup_complete = gdk_win32_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_win32_display_create_window_impl;
index cca0b651be77a28452584fea5aea02b8cd2ca7d5..843cdc8de846222fbe399cb524a549d387a37b4e 100644 (file)
@@ -2976,8 +2976,6 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
   display_class->supports_cursor_alpha = _gdk_x11_display_supports_cursor_alpha;
   display_class->supports_cursor_color = _gdk_x11_display_supports_cursor_color;
 
-  display_class->before_process_all_updates = _gdk_x11_display_before_process_all_updates;
-  display_class->after_process_all_updates = _gdk_x11_display_after_process_all_updates;
   display_class->get_next_serial = gdk_x11_display_get_next_serial;
   display_class->notify_startup_complete = gdk_x11_display_notify_startup_complete;
   display_class->create_window_impl = _gdk_x11_display_create_window_impl;
index 15e1170c1edcebef59a7c8a92521d11d2fa3d60e..e785af49959f75e3af9525e79b19fe92bba31f2d 100644 (file)
@@ -265,8 +265,6 @@ void       _gdk_x11_display_get_default_cursor_size (GdkDisplay *display,
 void       _gdk_x11_display_get_maximal_cursor_size (GdkDisplay *display,
                                                      guint      *width,
                                                      guint      *height);
-void       _gdk_x11_display_before_process_all_updates (GdkDisplay *display);
-void       _gdk_x11_display_after_process_all_updates  (GdkDisplay *display);
 void       _gdk_x11_display_create_window_impl     (GdkDisplay    *display,
                                                     GdkWindow     *window,
                                                     GdkWindow     *real_parent,
index 998d302f22285afee3d912ea7b45a66a92990473..204e5620ffa4ef4dc30b88ea6745fee0c52e60f6 100644 (file)
@@ -5094,21 +5094,6 @@ gdk_x11_window_set_opacity (GdkWindow *window,
                     (guchar *) &cardinal, 1);
 }
 
-void
-_gdk_x11_display_before_process_all_updates (GdkDisplay *display)
-{
-}
-
-void
-_gdk_x11_display_after_process_all_updates (GdkDisplay *display)
-{
-  /* Sync after all drawing, otherwise the client can get "ahead" of
-     the server rendering during animations, such that we fill up
-     the Xserver pipes with sync rendering ops not letting other
-     clients (including the VM) do anything. */
-  XSync (GDK_DISPLAY_XDISPLAY (display), FALSE);
-}
-
 static Bool
 timestamp_predicate (Display *display,
                     XEvent  *xevent,